<script setup>
import {onMounted} from "vue";
import {APP_NAME} from "./config/index.js";

import {useRoute, useRouter} from "vue-router";
import BaseLayout from "./views/BaseLayout.vue";
import {getCurrentUser} from "./apis/UserApi.js";

const route = useRoute()
const router = useRouter()
onMounted(() => {
    document.title = APP_NAME

    // getCurrentUser()
})
</script>

<template>
<!--    登录页面与预览页面不需要头部-->
    <template v-if="route.path.startsWith('/login')
                    || route.path.startsWith('/preview')
                    || route.path.startsWith('/result')">
        <router-view/>
    </template>
    <template v-else>
        <BaseLayout/>
    </template>

</template>

<style>
html,body{
    width: 100%;
    height: 100%;
}
*{
    margin: 0;
    padding: 0;
}

</style>
